﻿@model ITProject.WebUI.Models.ProjectUser.ShowTopicProjectUserViewModel
@{
    ViewBag.Title = "ShowTopic";
}
<div class="Pmenu">
  @Html.Partial(MVC.Shared.Views.Partials._ProjectMenuControl,
        new ITProject.WebUI.Models.Project.ProjectMenuViewModel { ProjectName = (string)ViewData["ProjectName"], Role = (ITProject.Domain.UserRole)ViewData["Role"] })
</div>

<div class="PAmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectUserMenu, new List<string> { "F", ViewData["ProjectName"].ToString() })
@*@Html.ActionLink("Zarządzaj użytkownikami",MVC.ProjectAdmin.ActionNames.ManageTeam, MVC.ProjectAdmin.Name, new { projectName = Model }, null)*@
</div>
<div class="PAplane" >
<div >
    <p class="title" style="width:667px">@Model.TopicName</p>
    <table class="inbox">
        @foreach (var item in Model.Posts)
        {
            <tr>
                <td class="label">
                    <h5>@item.AddDate</h5>
                    <h2>@item.AutorName</h2>
                </td>
                <td class="edit" style="width:500px">
                    @item.Content
                </td>
            </tr>
        }
    </table>
    <div style="text-align: right;">
        @{ Html.BeginForm(MVC.ProjectUser.ActionNames.AddPost, MVC.ProjectUser.Name);}
        @Html.HiddenFor(x => x.projectID)
        @Html.TextAreaFor(x => x.PostContent, new { @class = "input", @style="width:500px" })
        <br />
        <input class="button" type="submit" value="Dodaj post" />
        @{ Html.EndForm();}
    </div>
</div>
</div>
<div class="clear">
</div>